package com.rest.demo.jdbcdemo.service.impl;

import com.rest.demo.jdbcdemo.dao.IUserDao;
import com.rest.demo.jdbcdemo.entity.UserPo;
import com.rest.demo.jdbcdemo.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 * @decription
 * @Date 2017-11-14 14:47
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserDao userDao;

    @Override
    public List<UserPo> finaAllUser() {
        return userDao.finaAllUser();
    }

    @Override
    public UserPo findUserById(Integer id) {
        return userDao.findUserById(id);
    }

    @Override
    public int saveUser(UserPo userPo) {
        return userDao.saveUser(userPo);
    }

    @Override
    public int updateUser(UserPo userPo) {
        return userDao.updateUser(userPo);
    }

    @Override
    public int deleteUser(Integer id) {
        return userDao.deleteUser(id);
    }
}
